<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="com.knowledge.model.User" %>
<%
	List<User> friendList = (List<User>)request.getAttribute("friendList");
	String userId = (String)request.getAttribute("userId");
	String count = (String)request.getAttribute("friendCount");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<div id="fList">
	<div class="rounded-box sidebar-holder">
		<div class="corner tl">
			<div class="corner tr">
				<div class="corner bl">
					<div class="corner br">
						<div class="corner-body">
							<div class="side-item footprint">
								<div class="side-item-header clearfix">
									<h4>
										好友(<%=count %>)
									</h4>
									<div class="option">
										<a href="friends.jsp?userId=<%=userId %>">更多</a>
									</div>
								</div>
								<div class="side-item-body clearfix">
									<ul class="people-list">
									<%	if(friendList != null){
											for(User friend : friendList){
									%>
										
										<li>
											<span class="headpichold">
											<a href="profile.action?userId=<%=friend.getId() %>&loginId=<%=userId %>" title="查看<%=friend.getName() %>的个人主页"
												style="background-image: url('avatar/avatar_<%=friend.getId() %>.jpg');"></a>
											</span>
											<span class="olname clearfix">
												<a href="profile.action?userId=<%=friend.getId() %>&loginId=<%=userId %>"><%=friend.getName() %></a>
											</span>
										</li>
									<%		}
										}
									%>
									</ul>
								</div>
							</div>
							<div class="separator"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<%--<li>
											<span class="headpichold"> <a
												href="/profile.do?userid=5" title="查看陈文涛的个人主页"
												style="background-image: url('photos/tiny_luna_5.jpg');"></a>
											</span>
											<span class="olname clearfix">
												<a href="/profile.do?useId=5">陈文涛</a>
											</span>
										</li>--%>
